﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 第三次作业
{
    internal class c1
    {
        int[] num;
        void cul() {
            int sum=0,max=0,min=0;
            double aver;
            foreach (int n in num)
            {
                if (n > max) max = n;
                if (n < min) min = n;
                sum += n;
            }
            aver= sum/num.Length;
            Console.WriteLine($"最大值：{max}");
            Console.WriteLine($"最小值：{min}");
            Console.WriteLine($"平均值：{aver:F2}");
            Console.WriteLine($"元素和：{sum}");
        }

    }
}
